package com.game;

public class Card {
    String suit;
    String rank;
    int value;
    int kind;
    
    public Card(String rank, String suit) {
    	this.rank = rank;
    	this.suit = suit;
    	try {
    		this.value = Integer.parseInt(rank);
    		this.kind = this.value;
    	} catch (Exception ex) {
    		if (rank == "J") {
    			this.value = 0;
    			this.kind = 11;
    		} else if (rank == "Q") {
    			this.value = 0;
    			this.kind = 12;
    		} else if (rank == "K") {
    			this.value = 0;
    			this.kind = 13;
    		} else if (rank == "A") {
    			this.value = 1;
    			this.kind = 14;
    		}
    	}
    }
    
    public String toString() {
        return (rank + " of " + suit);
    }
	
}
